package cn.com.dycc.sys_manage.rolesysmanagement.entity;

import java.io.Serializable;
import java.sql.Timestamp;

import com.fasterxml.jackson.annotation.JsonFormat;


public class Role implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1141956617074693910L;
	
	private String role_no;        //角色编号
	private String role_name;		//角色名称
	private Integer order_no;		//排序
	private String state;			//是否启用
	private String org_id;			//组织标识
	private Timestamp create_date;	//创建时间
	private String opt_user_id;		//创建人
	private String update_date;		//更新时间
	private String update_user_id;	//更新人
	
	
	public Role(){}

	public Role(String role_no, String role_name, Integer order_no, String state, String org_id, Timestamp create_date,
			String opt_user_id, String update_date, String update_user_id) {
		super();
		this.role_no = role_no;
		this.role_name = role_name;
		this.order_no = order_no;
		this.state = state;
		this.org_id = org_id;
		this.create_date = create_date;
		this.opt_user_id = opt_user_id;
		this.update_date = update_date;
		this.update_user_id = update_user_id;
	}

	public String getRole_no() {
		return role_no;
	}

	public void setRole_no(String role_no) {
		this.role_no = role_no;
	}

	public String getRole_name() {
		return role_name;
	}

	public void setRole_name(String role_name) {
		this.role_name = role_name;
	}

	public Integer getOrder_no() {
		return order_no;
	}

	public void setOrder_no(Integer order_no) {
		this.order_no = order_no;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getOrg_id() {
		return org_id;
	}

	public void setOrg_id(String org_id) {
		this.org_id = org_id;
	}
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public Timestamp getCreate_date() {
		return create_date;
	}

	public void setCreate_date(Timestamp create_date) {
		this.create_date = create_date;
	}

	public String getOpt_user_id() {
		return opt_user_id;
	}

	public void setOpt_user_id(String opt_user_id) {
		this.opt_user_id = opt_user_id;
	}
	
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
	public String getUpdate_date() {
		return update_date;
	}

	public void setUpdate_date(String update_date) {
		this.update_date = update_date;
	}

	public String getUpdate_user_id() {
		return update_user_id;
	}

	public void setUpdate_user_id(String update_user_id) {
		this.update_user_id = update_user_id;
	}

	@Override
	public String toString() {
		return "Role [role_no=" + role_no + ", role_name=" + role_name + ", order_no=" + order_no + ", state=" + state
				+ ", org_id=" + org_id + ", create_date=" + create_date + ", opt_user_id=" + opt_user_id
				+ ", update_date=" + update_date + ", update_user_id=" + update_user_id + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((role_no == null) ? 0 : role_no.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Role other = (Role) obj;
		if (role_no == null) {
			if (other.role_no != null)
				return false;
		} else if (!role_no.equals(other.role_no))
			return false;
		return true;
	}

	
}
